package day20171115;

import java.io.IOException;

public class je08101 {
    public static void main(String[] args)throws IOException {
        int ch;
        int count=0;
        System.out.println("请输入字符（当输入0时退出）");
        while ((char)(ch=System.in.read())!='0'){
            count++;
            System.out.println((char)ch);
        }
        System.out.println();
        System.out.println("counted"+count+"total");
    }
}
